/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "fiscal_par_estadual")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FiscalParEstadual.findAll", query = "SELECT f FROM FiscalParEstadual f")})
public class FiscalParEstadual implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(name = "APURACAO_CONSOLIDADA")
    private Character apuracaoConsolidada;
    @Column(name = "SUBSTITUICAO_TRIBUTARIA")
    private Character substituicaoTributaria;
    @Column(name = "DEDUZIR_ST_IRPJ_CSLL")
    private Character deduzirStIrpjCsll;
    @Column(name = "CALC_PRES_ICMS_IMPORT")
    private Character calcPresIcmsImport;
    @Column(name = "DEDUZIR_IPI_ICMS")
    private Character deduzirIpiIcms;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idFiscalParEstadual")
    private List<FiscalInscricoesSubstitutas> fiscalInscricoesSubstitutasList;
    @JoinColumn(name = "ID_FISCAL_ESTADUAL_PORTE", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private FiscalEstadualPorte idFiscalEstadualPorte;
    @JoinColumn(name = "ID_FISCAL_ESTADUAL_REGIME", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private FiscalEstadualRegime idFiscalEstadualRegime;
    @JoinColumn(name = "ID_FISCAL_PARAMETROS", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private FiscalParametros idFiscalParametros;

    public FiscalParEstadual() {
    }

    public FiscalParEstadual(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Character getApuracaoConsolidada() {
        return apuracaoConsolidada;
    }

    public void setApuracaoConsolidada(Character apuracaoConsolidada) {
        this.apuracaoConsolidada = apuracaoConsolidada;
    }

    public Character getSubstituicaoTributaria() {
        return substituicaoTributaria;
    }

    public void setSubstituicaoTributaria(Character substituicaoTributaria) {
        this.substituicaoTributaria = substituicaoTributaria;
    }

    public Character getDeduzirStIrpjCsll() {
        return deduzirStIrpjCsll;
    }

    public void setDeduzirStIrpjCsll(Character deduzirStIrpjCsll) {
        this.deduzirStIrpjCsll = deduzirStIrpjCsll;
    }

    public Character getCalcPresIcmsImport() {
        return calcPresIcmsImport;
    }

    public void setCalcPresIcmsImport(Character calcPresIcmsImport) {
        this.calcPresIcmsImport = calcPresIcmsImport;
    }

    public Character getDeduzirIpiIcms() {
        return deduzirIpiIcms;
    }

    public void setDeduzirIpiIcms(Character deduzirIpiIcms) {
        this.deduzirIpiIcms = deduzirIpiIcms;
    }

    @XmlTransient
    public List<FiscalInscricoesSubstitutas> getFiscalInscricoesSubstitutasList() {
        return fiscalInscricoesSubstitutasList;
    }

    public void setFiscalInscricoesSubstitutasList(List<FiscalInscricoesSubstitutas> fiscalInscricoesSubstitutasList) {
        this.fiscalInscricoesSubstitutasList = fiscalInscricoesSubstitutasList;
    }

    public FiscalEstadualPorte getIdFiscalEstadualPorte() {
        return idFiscalEstadualPorte;
    }

    public void setIdFiscalEstadualPorte(FiscalEstadualPorte idFiscalEstadualPorte) {
        this.idFiscalEstadualPorte = idFiscalEstadualPorte;
    }

    public FiscalEstadualRegime getIdFiscalEstadualRegime() {
        return idFiscalEstadualRegime;
    }

    public void setIdFiscalEstadualRegime(FiscalEstadualRegime idFiscalEstadualRegime) {
        this.idFiscalEstadualRegime = idFiscalEstadualRegime;
    }

    public FiscalParametros getIdFiscalParametros() {
        return idFiscalParametros;
    }

    public void setIdFiscalParametros(FiscalParametros idFiscalParametros) {
        this.idFiscalParametros = idFiscalParametros;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FiscalParEstadual)) {
            return false;
        }
        FiscalParEstadual other = (FiscalParEstadual) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.FiscalParEstadual[ id=" + id + " ]";
    }
    
}
